Logic Gates

Buffer

Buffer: Anything you put in, you get out.

InOut
00
11

NOT (Inverter)

NOT: Flip the signal.

InOut
01
10

AND & OR

AND: If both are 1, return 1; otherwise return 0.

ABOut
000
010
100
111

OR: Inclusive OR

ABOut
000
011
101
111

NAND & NOR

NAND: NOT AND

ABOut
001
011
101
110

NOR: NOT OR

ABOut
001
010
100
110

XOR & XNOR

XOR: Exclusive OR

ABOut
000
011
101
110

XNOR: Exclusive NOR

ABOut
001
010
100
111

Universal/Complete Gates

NAND and NOR can create all the basic logic gates.

NAND

NOT:

OR:

AND:

NOR

NOT:

AND:

OR:

NAND:

Multiplexer (MUX)

MUX: Functions like a switchboard.

2:1

This MUX takes three inputs, a, b, and c. 

cout
0a
1b

c'a+cb

We can make any basic logic gate with a MUX.

Example: Creating Logic Gate with a 2:1 MUX

Suppose we want to configure a MUX to give this truth table:

about
001
011
100
111

We want to split the table into two states first.

about
001
011
about
100
111

Observation: We can immediately see that when a=0, out is always 1, so we can draw a partial MUX like this:

Observation: Looking at the other truth table, we can see that out is always b when a=1, so we can draw a partial MUX like this:

Putting it all together, the final MUX is this:

4:1

TODO draw a 4:1 MUX

This MUX takes six inputs, a, b, c, d, x, and y

xyout
00a
01b
10c
11d

When and How to Use

8:1

TODO draw a 8:1 MUX

xyzout
000a
001b
010c
011d
100e
101f
110g
111h